package api

import (
	"github.com/gin-gonic/gin"
	"strings"
)

type HttpResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    any    `json:"data"`
}

type Params struct {
	Ctx *gin.Context
}

func (p *Params) Query(key string) string {
	return p.Ctx.Query(strings.ToLower(key))
}

func (p *Params) Param(key string) string {
	return p.Ctx.Param(strings.ToLower(key))
}
